package ren.renshuaipeng.util.search.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import ren.renshuaipeng.util.search.dao.TestMapper;
import ren.renshuaipeng.util.search.domain.Test;

import javax.annotation.Resource;
import java.util.List;

/**
 * ClassName: TestService<br/>
 * Function: xx. <br/>
 * Date:     2015/12/14 16:04<br/>
 *
 * @author 任帅鹏（作者）
 * @version V1.00 （版本号）
 * @see
 * @since JDK 1.8
 */
@Service
public class TestService {

    @Resource
    TestMapper testMapper;

    public PageInfo<Test> findAll(int pageNum,int pageSize){
        PageHelper.startPage(pageNum, pageSize);
        List<Test> list= testMapper.findAll();
        return new PageInfo<>(list);
    }
}
